package com.cskaoyan.catmall.model.bo;

import lombok.Data;
import lombok.NoArgsConstructor;
import org.hibernate.validator.constraints.Length;

import javax.validation.constraints.Email;
import javax.validation.constraints.NotNull;
import javax.validation.constraints.Pattern;


/**
 * 创建日期: 2022-01-08-20-21
 * author : WQW
 * description: 用于新增管理员接收参数信息
 */
@NoArgsConstructor
@Data
public class AdminCreateBo {

    @Email(message = "请输入正确的邮箱格式")
    private String username;
    @Pattern(regexp = "^(?=.*\\d)(?=.*[a-z])(?=.*[A-Z]).{8,16}$",message = "密码必须包含大小写字母和数字，且长度在8到16位之间")
    private String password;
    @NotNull(message = "管理员头像不能为空")
    private String avatar;
    private Integer[] roleIds;
}
